home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROCS.ZIP
/
PROCNAME.ICN
< prev
next >
Wrap
Text File
|
1992-09-29
|
977b
|
34 lines
############################################################################
#
# File: procname.icn
#
# Subject: Procedure to produce name of procedure
#
# Author: Ralph E. Griswold
#
# Date: September 17, 1992
#
###########################################################################
#
# procname(p) produces the name of a procedure from a procedure value.
# Here, the term "procedure" includes functions, operators, and
# record constructors. In the case of operators, the number of
# arguments is appended to the operator symbol.
#
# It fails if p is not of type procedure.
#
############################################################################
procedure procname(p)
if type(p) ~== "procedure" then fail
image(p) ? {
tab(upto(' ') + 1) # we trust image() ...
tab(upto(' ') + 1) # this for record constructors
return if upto(&letters) then tab(0) else tab(0) || args(p)
}
end